<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>修改信息</title>
    <script type="text/javascript" src="../common/jquery-3.2.1.js"></script>
    <script type="text/javascript" src="../common/commonManager.js"></script>
    <script type="text/javascript">

        function requestServer(formName) {
            var form = $("#" + formName);
            $.ajax({
                url: form.attr("action"),
                data: form.serialize() + "&managerId=" + manager.managerId,
                success: function (ajaxResult) {
                    if (ajaxResult.success) {
                        alert("成功");
                    } else {
                        alert("失败，原因：" + ajaxResult.message);
                    }
                },
                error: function () {
                    alert("请求服务失败");
                }
            });
        }

    </script>
</head>
<body>
<br><br>
<div>
    修改名称：
    <form id="modifyNameForm" action="../manager/manage/modifyName">
        <table>
            <tr>
                <td align="right">新名称：</td>
                <td><input type="text" name="newName"></td>
            </tr>
            <tr>
                <td align="right"><input type="button" onclick="requestServer('modifyNameForm')" value="提交">
                </td>
                <td></td>
            </tr>
        </table>
    </form>
</div>
<br><br>
<div>
    修改密码：
    <form id="modifyPasswordForm" action="../manager/manage/modifyPassword">
        <table>
            <tr>
                <td align="right">新密码：</td>
                <td><input type="password" name="newPassword"></td>
            </tr>
            <tr>
                <td align="right"><input type="button" onclick="requestServer('modifyPasswordForm')" value="提交">
                </td>
                <td></td>
            </tr>
        </table>
    </form>
</div>
</body>
</html>